
<%-------------------------------------------------------------------
 * 页面名称：userSetup.jsp
 * 功能描述：定制您的提示信息
 * Action  : 
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%
String path = request.getContextPath();
%>
<script language="javascript" type="text/javascript"
	src='<%=path%>/js/vnv/commonForMutual.js' charset="UTF-8"></script>
<script language="javascript" type="text/javascript"
	src='<%=path%>/js/vnv/commonForManage.js' charset="UTF-8"></script>
<script type='text/javascript' src='<%=path%>/js/ufront.js'></script>
<script language="JavaScript" type="text/JavaScript">
function changeState (obj,state){
	if(state == "M"){
		obj.checked = true;
		obj.disabled = true;
	}
	if(state == "Y"){
		obj.checked = true;
	}
	if(state == "N"){
		obj.checked = false;
	}
}
function submitProcess() {
	document.forms["0"].submit();
}
function onclickAllEmail(){
	//alert(document.getElementById('allemail').checked);
	var checkeArray = new Array(
	<logic:iterate id="message" name="finalMessages">
		new Array(<logic:iterate indexId="ind" id="m" name="message">"<bean:write name="m"/>",</logic:iterate>""),
	</logic:iterate>
		new Array("","","","")
	);
	
	var email = document.SetupForm.email_group;
	if(document.getElementById('allemail').checked){
		for(i=0;i<checkeArray.length;i++){
			for(j=0;j<email.length;j++){
				email[j].checked=true;
			}
		}
	}else{
		for(i=0;i<checkeArray.length;i++){
			for(j=0;j<email.length;j++){
				email[j].checked=false;
			}
		}
	}
}
function onclickAllMobile(){
	var checkeArray = new Array(
	<logic:iterate id="message" name="finalMessages">
		new Array(<logic:iterate indexId="ind" id="m" name="message">"<bean:write name="m"/>",</logic:iterate>""),
	</logic:iterate>
		new Array("","","","")
	);
	
	var mobile = document.SetupForm.mobile_group;
	if(document.getElementById('allmobile').checked){
		for(i=0;i<checkeArray.length;i++){
			for(j=0;j<mobile.length;j++){
				mobile[j].checked=true;
			}
		}
	}else{
		for(i=0;i<checkeArray.length;i++){
			for(j=0;j<mobile.length;j++){
				mobile[j].checked=false;
			}
		}
	}
}
</script>
<div id="main">
	<!-- 定制提醒信息模块开始 -->
	<div class="content_right">
		<div style="width:745px;margin-left:10px;">
			<div class="titleinfo">
				定制提醒信息
			</div>
			<div style="border:1px #CCCCCC solid;">
				 <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" >
          <tr>
            <td colspan="3" bgcolor="#FFFFFF"><br />
                <table width="100%" border="0" align="center" cellpadding="7" cellspacing="1" bgcolor="#f9e277" style="margin:10px 0;">
                  <tr>
                    <td bgcolor="#fffdf5"><table width="100%" border="0" cellpadding="3" cellspacing="0">
                        <tr >
                          <td width="3%" height="25" valign="top" style="border-bottom:1px solid #ccc;"></td>
                          <td width="97%" align="left" class="red12b" style="border-bottom:1px solid #ccc;">特别提醒</td>
                        </tr>
                        <tr>
                          <td valign="top">&nbsp;</td>
                          <td align="left" class="font_gray"><span class="text9green"> </span>感谢您使用支付服务，您可以通过<span class="org">定制功能</span>来决定在您使用支付系统的过程中，系统是否为您作出提醒。但是，在某些特定的情况下，您一定会收到系统的提醒。 <span class="text9green">如：忘记密码，积分激活，交易超期提醒 等</span>，若为您带来了不便，敬请谅解。 </td>
                        </tr>
                        <tr>
                          <td valign="top">&nbsp;</td>
                          <td align="left" class="font_gray"><span class="text9green"> 存折账号</span>的<span class="redColor12px">'*'</span>和<span class="text9green">企业账户</span>的<span class="redColor12px">'-'</span>在此均<span class="redColor12px">无需输入</span></td>
                        </tr>
                    </table></td>
                  </tr>
                </table>
            </td>
          </tr>
          </table>
				<div style="margin-left: 40px;">
					<html:form method="post" action="/UserSetup.do">
						<input name="dispatch" type="hidden" value="save" />
						<table width="680px;">
							<tr>
								<td width="606" height="30px;">
								</td>
								<td width="62" align="right" id="hasEmail0">
									<font color="#0099C;">Email</font>
								</td>
								<td width="62" align="right" id="hasMobile0">
									<font color="#0099C;">短 信</font>
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;">
								</td>
								<td align="right" id="hasEmail21">
									<font color="#0099C;" style="font-size:12px;">全选&nbsp;&nbsp;&nbsp;</font>
									<input name="allemail" type="checkbox" id="allemail"
										onclick="onclickAllEmail();" style="border:0" />
								</td>
								<td align="right" id="hasMobile21">
									<font color="#0099C;" style="font-size:12px;">全选&nbsp;&nbsp;&nbsp;</font>
									<input name="allmobile" type="checkbox" id="allmobile"
										onclick="onclickAllMobile();" style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										1.银行卡绑定
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail1">
									<input name="email_group" type="checkbox" value="22"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile1">
									<input name="mobile_group" type="checkbox" value="22"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										2.网上银行充值
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail2">
									<input name="email_group" type="checkbox" value="2"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile2">
									<input name="mobile_group" type="checkbox" value="2"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										3.账户提现&账户充值
									</div>
								</td>
								<td align="right" class="check_tr" d="hasEmail3">
									<input name="email_group" type="checkbox" value="3"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile3">
									<input name="mobile_group" type="checkbox" value="3"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										4.子账户转换
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail5">
									<input name="email_group" type="checkbox" value="5"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile5">
									<input name="mobile_group" type="checkbox" value="5"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										<font style="font-weight:700;">买方</font>
									</div>
								</td>
								<td align="right" class="check_tr">
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										1.买方付款，等待卖方发货通知（作为买方）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail6">
									<input name="email_group" type="checkbox" value="6"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile6">
									<input name="mobile_group" type="checkbox" value="6"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										2.卖方发货，等待买方确认通知（作为买方）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail7">
									<input name="email_group" type="checkbox" value="7"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile7">
									<input name="mobile_group" type="checkbox" value="7"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										3.交易成功通知（作为买方）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail8">
									<input name="email_group" type="checkbox" value="8"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile8">
									<input name="mobile_group" type="checkbox" value="8"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										4.收款通知（卖方向买方收款，作为买方）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail9">
									<input name="email_group" type="checkbox" value="12"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile9">
									<input name="mobile_group" type="checkbox" value="12"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										5.收款取消通知（买方取消向卖方请求退款，卖方同意退款）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail10">
									<input name="email_group" type="checkbox" value="13"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile10">
									<input name="mobile_group" type="checkbox" value="13"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										6.退款成功通知（买方向卖方请求退款，卖方同意退款）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail11">
									<input name="email_group" type="checkbox" value="15"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile11">
									<input name="mobile_group" type="checkbox" value="15"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										7.争议处理通知
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail12">
									<input name="email_group" type="checkbox" value="16"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile12">
									<input name="mobile_group" type="checkbox" value="16"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										8.争议处理结果通知（作为买方）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail13">
									<input name="email_group" type="checkbox" value="17"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile13">
									<input name="mobile_group" type="checkbox" value="17"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										<font style="font-weight:700;">卖方</font>
									</div>
								</td>
								<td align="right" class="check_tr">

								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										1.买方付款，等待卖方发货通知（作为卖方）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail14">
									<input name="email_group" type="checkbox" value="9"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile14">
									<input name="mobile_group" type="checkbox" value="9"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										2.卖方发货，等待买方确认通知（作为卖方）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail15">
									<input name="email_group" type="checkbox" value="10"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile15">
									<input name="mobile_group" type="checkbox" value="10"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										3.交易成功通知，等待买方确认通知（作为卖方）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail16">
									<input name="email_group" type="checkbox" value="11"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile16">
									<input name="mobile_group" type="checkbox" value="11"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										4.收款通知（卖方向买方收款，作为卖方）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail17">
									<input name="email_group" type="checkbox" value="1"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile17">
									<input name="mobile_group" type="checkbox" value="1"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" class="check_tr">
									<div>
										5.退款请求通知（买方向卖方申请退款）
									</div>
								</td>
								<td align="right" class="check_tr" id="hasEmail18">
									<input name="email_group" type="checkbox" value="14"
										style="border:0" />
								</td>
								<td align="right" class="check_tr" id="hasMobile18">
									<input name="mobile_group" type="checkbox" value="14"
										style="border:0" />
								</td>
							</tr>
							<tr>
								<td colspan="2" class="check_tr">
									<logic:present name="errorMsg">
										<font color="#FF0000"><bean:write name="errorMsg" /> </font>
									</logic:present>
								</td>
							</tr>
							<tr>
								<td width="606" height="30px;" rowspan="2" align="center">

									<input type="button" name="sure" value="确 定" class="button_style"
										onclick="submitProcess();" />
									&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="button" name="return" value="返 回" class="button_style"
										onclick="loading('<%=path%>/route.do?modual=space$account&showTab=3');" />

								</td>
							</tr>
							
						</table>
					</html:form>
				</div>
			</div>
		</div>
	</div>
	<!-- 定制提醒信息模块结束 -->
</div>
<script language="javascript">
	var checkeArray = new Array(
	<logic:iterate id="message" name="finalMessages">
		new Array(<logic:iterate indexId="ind" id="m" name="message">"<bean:write name="m"/>",
									
									</logic:iterate>""),
	</logic:iterate>
	    new Array("","","","")
	);
	
	var mobile = document.SetupForm.mobile_group;
	var email = document.SetupForm.email_group;
	document.getElementById('allemail').checked = true;
	document.getElementById('allmobile').checked = true;
	//alert(checkeArray.length);
	for(i=0;i<checkeArray.length;i++){
		for(j=0;j<email.length;j++){
			if(email[j].value == checkeArray[i][0]){
				changeState(email[j],checkeArray[i][1]);
				if(email[j].checked==false){
					document.getElementById('allemail').checked = false;
				}
			}
		}
		for(z=0;z<mobile.length;z++){
			if(mobile[z].value == checkeArray[i][0]){
				changeState(mobile[z],checkeArray[i][2]);
				if(mobile[z].checked==false){
					document.getElementById('allmobile').checked = false;
				}
			}
		}
	}
	
	<logic:notEqual name="account" property="mobStatus" value="7">
	for(i=0;i<22;i++){
		if(i==4||i==19||i==20)
		{
		}
		else
		{
		var disName = "hasMobile"+i;
		setDisplay(disName,"none");
		}
	}
	</logic:notEqual>
	<logic:notEqual name="account" property="emStatus" value="7">
	for(i=0;i<22;i++){
	if(i==4||i==19||i==20)
		{
		}
		else
		{
		var disName = "hasEmail"+i;
		setDisplay(disName,"none");
		}
		
	}
	</logic:notEqual>
</script>

